<template>
  <div class="about">
    <h1>This is an about page
    </h1>
  </div>
</template>
<script>
export default {
  mounted () {
    function takeLongTime (n) {
      return new Promise(resolve => {
        setTimeout(() => resolve(n + 200), n);
      });
    }

    function step1 (n) {
      console.log(`step1 with ${n}`);
      return takeLongTime(n);
    }

    function step2 (n) {
      console.log(`step2 with ${n}`);
      return takeLongTime(n);
    }

    function step3 (n) {
      console.log(`step3 with ${n}`);
      return takeLongTime(n);
    }
    async function doIt () {
      const time1 = 300
      const time2 = await step1(time1)
      const time3 = await step2(time2);
      const result = await step3(time3);
      console.log(`result is ${result}`);
      console.timeEnd("doIt");
    }

    doIt();
  }
}
</script>  
